using Brick;
using System;
using System.Collections.Generic;
using UnityEngine;

namespace Assets.Scripts.GDK
{
	public class gdk_game_manager
	{
		public static TimeModel lastTime;

		public static bool isDebug;

		public static gdk_localStorage localStorage;

		public static void init()
		{
			UnityEngine.Debug.Log("gdk_game_manager init");
			lastTime = gdk_game_data.lastTime;
			TimeModel timeModel2 = gdk_game_data.lastTime = gdk_utils.getTimeModel();
		}

		public static TimeModel getLastTime()
		{
			return lastTime;
		}

		public static GameObject getScene()
		{
			return gdk_scene_manager.getScene();
		}

		public static void loadScene(string scene)
		{
			gdk_scene_manager.loadScene(scene);
		}

		public static void loadScene(int sceneIndex)
		{
			gdk_scene_manager.loadScene(sceneIndex);
		}

		public static void blackScene()
		{
			gdk_scene_manager.blackScene();
		}

		public static void setButtonEnabled(bool isEnabled)
		{
			DispachEvent("GDK_BUTTON_ENABLED", isEnabled);
		}

		public static void showPanel(string itemID)
		{
			gdk_panel_manager.show(itemID);
		}

		public static void showPanel(string itemID, Action<GameObject> callback)
		{
			gdk_panel_manager.show(itemID, callback);
		}

		public static void hidePanel(GameObject node)
		{
			gdk_panel_manager.hide(node);
		}

		public static void showAlert(string itemID)
		{
			gdk_alert_manager.show(itemID);
		}

		public static void showAlert(string itemID, Action<GameObject> callback)
		{
			gdk_alert_manager.show(itemID, callback);
		}

		public static void hideAlert(GameObject node)
		{
			gdk_alert_manager.hide(node);
		}

		public static void showSetting(string itemID)
		{
			gdk_setting_manager.show(itemID);
		}

		public static void showSetting(string itemID, Action<GameObject> callback)
		{
			gdk_setting_manager.show(itemID, callback);
		}

		public static void hideSetting(GameObject node)
		{
			gdk_setting_manager.hide(node);
		}

		public static void showGuide(string itemID)
		{
			gdk_guide_manager.show(itemID);
		}

		public static void showGuide(string itemID, Action<GameObject> callback)
		{
			gdk_guide_manager.show(itemID, callback);
		}

		public static void hideGuide(GameObject node)
		{
			gdk_guide_manager.hide(node);
		}

		public static void showTip(string itemID)
		{
			gdk_tip_manager.show(itemID);
		}

		public static void showTip(string itemID, Action<GameObject> callback)
		{
			gdk_tip_manager.show(itemID, callback);
		}

		public static void hideTip(GameObject node)
		{
			gdk_tip_manager.hide(node);
		}

		public static void showDebug(string itemID)
		{
			gdk_debug_manager.show(itemID);
		}

		public static void showDebug(string itemID, Action<GameObject> callback)
		{
			gdk_debug_manager.show(itemID, callback);
		}

		public static void hideDebug(GameObject node)
		{
			gdk_debug_manager.hide(node);
		}

		public static void showLoading(string itemID)
		{
			gdk_loading_manager.show(itemID);
		}

		public static void showLoading(string itemID, Action<GameObject> callback)
		{
			gdk_loading_manager.show(itemID, callback);
		}

		public static void hideLoading(GameObject node)
		{
			gdk_loading_manager.hide(node);
		}

		public static void message(string msg)
		{
			gdk_message_manager.show(MessageID.TextMessage, msg);
		}

		public static void log(string msg, float time = 2f)
		{
			if (isDebug)
			{
				gdk_log_manager.log(msg, time);
			}
		}

		public static T loadJsonS<T>(string id)
		{

            return gdk_load.loadJsonS<T>(id);
		}

		public static Dictionary<string, T> loadJson<T>(string id)
		{

			return gdk_load.loadJson<T>(id);
		}

		public static GameObject loadPrefab(string id)
		{
			return gdk_load.loadPrefab(id);
		}

		public static Sprite loadSprite(string id)
		{
			return gdk_load.loadSprite(id);
		}

		public static void PlayMusic(string musicID)
		{
			gdk_music.Instance.PlayMusic(musicID);
		}

		public static void PlaySound(string soundID)
		{
			gdk_music.Instance.PlaySound(soundID);
		}

		public static void PlayHitSound()
		{
			gdk_music.Instance.PlayHitSound();
		}

		public static void PlaySheXianSound()
		{
			gdk_music.Instance.PlaySheXianSound();
		}

		public static void gamePause()
		{
		}

		public static void gameResume()
		{
		}

		public static void AddEventListener(string name, Callback callback)
		{
			gdk_center.Instance.AddEventListener(name, callback);
		}

		public static void AddEventListener<T>(string name, Callback<T> callback)
		{
			gdk_center.Instance.AddEventListener(name, callback);
		}

		public static void AddEventListener<T, T2>(string name, Callback<T, T2> callback)
		{
			gdk_center.Instance.AddEventListener(name, callback);
		}

		public static void RemoveEventListener(string name, Callback callback)
		{
			gdk_center.Instance.RemoveEventListener(name, callback);
		}

		public static void RemoveEventListener<T>(string name, Callback<T> callback)
		{
			gdk_center.Instance.RemoveEventListener(name, callback);
		}

		public static void RemoveEventListener<T, T2>(string name, Callback<T, T2> callback)
		{
			gdk_center.Instance.RemoveEventListener(name, callback);
		}

		public static void DispachEvent(string name)
		{
			gdk_center.Instance.DispachEvent(name);
		}

		public static void DispachEvent<T>(string name, T obj)
		{
			gdk_center.Instance.DispachEvent(name, obj);
		}

		public static void DispachEvent<T, T2>(string name, T obj, T2 obj2)
		{
			gdk_center.Instance.DispachEvent(name, obj, obj2);
		}
	}
}
